package com.letu.core.excel.bean;

import cn.hutool.core.collection.CollectionUtil;
import lombok.Getter;

import java.util.List;

/**
 * @ClassName ExcelAnalyzeResult
 * @Description Excel解析结果
 * @Author yuwx
 * @Date 2021/9/6 11:46
 * @Version 1.0
 **/
@Getter
public class ExcelAnalyzeResult<T> {
    /**
    *Description 是否全部成功
    *@Date 13:10 2021/9/6
    *@param null
    *@return
    *@Author yuwx
    **/
    private Boolean success;
    /**
    *Description 解析正常结果
    *@Date 13:10 2021/9/6
    *@param null
    *@return
    *@Author yuwx
    **/
    private List<T> resultList;
    /**
    *Description 解析异常结果
    *@Date 13:10 2021/9/6
    *@param null
    *@return
    *@Author yuwx
    **/
    private List<ExcelAnalyzeExceptionResult> exceptionResult;

    public ExcelAnalyzeResult(List<T> resultList, List<ExcelAnalyzeExceptionResult> exceptionResult) {
        this.success = CollectionUtil.isEmpty(exceptionResult)? true : false;
        this.resultList = resultList;
        this.exceptionResult = exceptionResult;
    }
}
